#ifndef _GENERATOREXP_H_
#define _GENERATOREXP_H_
#include "ast/exprType.h"
#include "ast/comprehensionType.h"
#include "AstTypes.h"
class IVisitor;
class GeneratorExp;
typedef QSharedPointer<GeneratorExp> GeneratorExpPtr;

class GeneratorExp: public exprType
{
public:
    explicit GeneratorExp(const exprTypePtr& elt, const ComprehensionTypeList& generators, int nodeId=-1);
    virtual ~GeneratorExp();
    
    
    exprTypePtr elt();
    void setElt(const exprTypePtr& elt);
    
    ComprehensionTypeList generators();
    void setGenerators(const ComprehensionTypeList& generators);
    
    
    virtual Ast::AstTypes type() const;
    virtual QString toString() const;
    virtual void accept(IVisitor* visitor, const SimpleNodePtr& node);
    virtual void traverse(IVisitor* visitor);
private:
    exprTypePtr _elt;
    ComprehensionTypeList _generators;
};




#endif